
//1. 模块1中的三个环形图
$.left_top_map = function(el,data){
  var data = [
    {name: '全程办理量', value: 505},
    {name: '办结量', value: 405},
    {name: '网办量', value: 350}
  ];
    
  var total = 0; 
  $.each(data,function(i){
    var n = parseFloat(this.value);
    if(isNaN(n)){
      n = 0;
    }
    data[i].value = n;
    total += parseFloat(this.value);
  })

  var titleArr= [], seriesArr=[];
  var colors =['#FFE033', '#38FBA7', '#34DFFF'];
 $.each(data, function(index, item){
    titleArr.push(
      {
        text:item.name,
        left: index * 30+20+'%',
        // top: '65%',
        bottom: '8%',
        textAlign: 'center',
        textStyle: {
          fontWeight: 'normal',
          fontSize: 16*KO,
          // color: colors[index],
          color: "#fff",
          textAlign: 'center',
        },
      }        
    );
    seriesArr.push(
      {
        name: item.name,
        type: 'pie',
        clockWise: false,
        radius: [30*KO, 42*KO],
        itemStyle:  {
          normal: {
            color: colors[index],
            shadowColor: colors[index],
            shadowBlur: 0,
            label: {
              show: false
            },
            labelLine: {
              show: false
            },
          }
        },
        // hoverAnimation: false,
        center: [index * 30 +20+'%', '40%'],
        data: [{
          value: item.value,
          label: {
            normal: {
              formatter:'{c}\n{h|{d}%}',
              // formatter: function(params){
              //   var bl = ((+params.value)*100/total).toFixed(2);
              //   // return params.value+'%';
              //   return params.value+'\n{h|'+bl+' %}';
              // },
              position: 'center',
              show: true,
              textStyle: {
                fontSize: 14*KO,
                fontWeight: 'bold',
                color: colors[index]
              },
              rich:{
                h:{
                  fontSize:12*KO,
                  color:'#fff',
                }
              }
            }
          },
        }, {
          // value: total,
          value: total - item.value,
          name: 'invisible',
          itemStyle: {
            normal: {
              color: '#020F34'
            },
            emphasis: {
              color: '#020F34'
            }
          }
        }]
      }    
    )
  });
  var option = {
    grid: {
      top: '15%',
      right: '10%',
      left: '10%',
      bottom: '30%'
    },
    title: titleArr,
    series: seriesArr
  }
  echarts.init(el).setOption(option);
}

//2. 窗口监控模块中的窗口满意度 雷达图
$.tem3_row3_left_map = function(el,data){
  var data = data || [26, 33, 55, 11, 82];
  var title = [
    { name: '非常满意', max: 100},
    { name: '满意', max: 100},
    { name: '基本满意', max: 100},
    { name: '不满意', max: 100},
    { name: '非常不满意', max: 100}
  ];
  var html = '<div style="font-size:0.12rem;line-height:1.6;padding:0.1rem;">'
  var total = 0;
  $.each(data,function(){
    total += +this;
  })
 
  $.each(title,function(i,v){
    var n = (100*data[i] / total).toFixed(2);
    html += v.name+': <span style="color:yellow">'+data[i]+'</span>个<br>'
    title[i].name = v.name +'\n{c|'+n+'%}';
    
  })
  html += '</div>';

  var option = {
    tooltip: {
      textStyle:{
        fontSize:12*KO
      },
      // formatter:function(a,b,c,d){
      //   console.log(a)
      // },
      formatter: html    
    },
    radar: {
      // shape: 'circle',
      radius: 60*KO,
      center: ['50%', '56%'],
      name: {
        textStyle: {
          color: '#fff',
          fontSize:12*KO,
          // backgroundColor: '#999',
          // borderRadius: 3,
          // padding: [3, 5]
        },
        // formatter: '{value}',
        formatter:function(value){
          return value;
          console.log(x,y,z)
        },
        rich:{
          c:{
            color:'#00FFB5',
            fontSize:12*KO
          }
        }
      },
      splitArea: {
        areaStyle: {
          color: ['rgba(255,255,255, 0.2)', 'rgba(255,255,255,0.2)'],
          shadowColor: 'rgba(0, 0, 0, 0.3)',
          shadowBlur: 10
        }
      },
      axisLine: {
        lineStyle: {
          color: 'rgba(255, 255, 255, 0.1)'
        }
      },
      splitLine: {
        lineStyle: {
          color: 'rgba(255, 255, 255, 0.1)'
        }
      },
      indicator: title
    },
    series: [{
      type: 'radar',
      areaStyle: {
        normal: {
          // background:"#1C499E",
          // borderColor:'#fff'
        }
      },
      data: [
        {
          name:"满意度区间：",
          value:data,
          // symbol: 'rect',
          // symbolSize: 5,
          lineStyle: {
            // type: 'dashed'
            color:"#1C499E"
          },
          areaStyle: {
            opacity: 0.5,
            color:"#1C499E"
          }
        }
      ]
    }]
  };
  echarts.init(el).setOption(option);
}


//3. 窗口监控模块中的窗口办件量
$.tem3_row3_right_map = function(el,data){
  var obj = {
    name:['6号窗口', '1号窗口', '2号窗口', '7号窗口', '3号窗口'],
    value:[60, 50, 20, 51, 46]  
  };
  var d = {
    data: data || obj,
    zhuColor: data.zhuColor || ['rgba(0,255,168,1)', 'rgba(0,255,168,0)'],
    zhuWidth: 20*KO,
    size:12*KO,
    grid:{
      left:'15%',
      top:'30%',
      right:'10%',
      bottom:'30%'
    },
    // textColor:'#6A8597' 
    textColor:'#39F5FF' 
  }
  // home_basezhu(el,d);
  home_baserect_zhu(el,d);
}


//4. 左下角事项办理等图形
$.left_bottom_map = function(el,data,line){
  var obj = {
    name:['部门1', '部门2', '部门3', '部门4', '部门5'],
    value:[600, 550, 520, 501, 486]
  };
  var d = {
    data: data || obj,
    zhuColor: data.zhuColor || ['rgba(253,223,50,1)', 'rgba(253,223,50,0)'],
  }
  if(line){   //线条
    home_baseline(el,d)
  }else{      //柱状图
    home_basezhu(el,d);
  }
}


//5. 各银行网点历史办件量
$.tem5_yhwd_map = function(el,data){
  var obj = {
    name:['银行1', '银行1', '银行1', '银行1', '银行1', '银行1', '银行1', '银行1', '银行1', '银行1'],
    value:[60, 50, 20, 51, 46, 46, 46, 46, 46, 46]  
  };
  var d = {
    data: data || obj,
    zhuColor: data.zhuColor || ['rgba(2, 99, 255,1)', 'rgba(2, 99, 255,0.1)'],
    zhuWidth: 20*KO,
    size:12*KO,
    grid:{
      left:'10%',
      top:'30%',
      right:'10%',
      bottom:'30%'
    },
    textColor:'#6A8597'
  }
  home_basezhu(el,d);
}


//6. 办件量最多的银行TOP5
$.tem5_bjtop5_map = function(el,data){
  var obj = {
    name:["中国农业银行","中国人民银行","中国建设银行","中国工商银行","中国交通银行"],
    value:[55, 35, 30,22,20]
  };
  var d = {
    data: data || obj,
    zhuColor: data.zhuColor || ['rgba(253, 184, 110,0)', 'rgba(253, 184, 110,1)'],
    barWidth: 15*KO,
    size:12*KO,
    grid:{
      left:'30%',
      top:'25%',
      right:'10%',
      bottom:'15%'
    },

  }
  home_basezhu2(el,d)
}

//7. 银行网点热门事件TOP5
$.tem5_sxtop5_map = function(el,data){
  var obj = {
    name:["事件111","事件111","事件111","事件111","事件111"],
    value:[55, 35, 30,22,20]
  };
  var d = {
    data: data || obj,
    zhuColor: data.zhuColor || ['rgba(251, 221, 54,0)', 'rgba(251, 221, 54,1)'],
    barWidth: 15*KO,
    size:12*KO,
    grid:{
      left:'40%',
      top:'25%',
      right:'10%',
      bottom:'15%'
    }
  }
  home_basezhu2(el,d)
}

//8. 右下角办事大厅监控图形
$.tem6_right_bottom_map = function(el,data){
  var data = {
    zhu1:[235, 246, 255, 249, 260, 243, 251],     //处理完成各时间段数量
    zhu2:[46, 52, 51, 54, 47, 50, 52],            //正在处理各时间段数量
    zhu3:[35, 67, 72, 65, 82, 73, 49]             //正在等待各时间段数量
  };

  var option = {
    title: {
      text: ''
    },
    tooltip: {
      trigger: 'axis',
      axisPointer: {
          type: 'cross',
          label: {
              backgroundColor: '#FFED27',
              fontSize: 12*KO,
              color:'#001A53'
          }
      },
      textStyle:{
        fontSize: 12*KO,
      },
      formatter:'{b}<br>{a0}：<span style="color:#FFED27;">{c0}</span><br>{a1}：<span style="color:#FFED27;">{c1}</span><br>{a2}：<span style="color:#FFED27;">{c2}</span>',
      padding:[10,20]      
    },
    // legend: {
    //   data: ['处理完成', "正在处理", "正在等待"],
    //   // bottom: 50,    //距离底部的距离
    //   // textStyle: {   //字体样式
    //   //   color: "#fff",
    //   //   fontSize: 20,
    //   //   fontWeight: "lighter"
    //   // },
    //   // itemGap: 100, //图块间隙
    //   // itemWidth: 150, //图块宽
    //   // itemHeight: 30 //图块高
    //   top:'5%',
    //   right: "2%",
    //   align: "right",
    //   textStyle: { //字体样式
    //     color: "#fff",
    //     fontSize: this.f1,
    //   },
    //   itemGap: this.f1*2, //图块间隙
    //   itemWidth: this.f1, //图块宽
    //   itemHeight: this.f1, //图块高
    //   // orient: "vertical"
    // },
    grid: {
      top: "18%",
      left: "2%", //折线框左边距
      right: "8%", //折线框右边距
      bottom: "5%", //折线框下边距
      containLabel: true
    },
    xAxis: {
      type: 'category',
      name: "时间",
      data: ["9:00-10:00", "10:00-11:00", "11:00-12:00", "14:00-15:00", "15:00-16:00", "16:00-17:00", "17:00-18:00"],
      nameTextStyle: { //坐标轴名称样式
        color: "#e2e9ff",
        fontSize: 12*KO,
        backgroundColor: "" //文字块背景色
      },
      nameGap: 5*KO, //坐标名称与轴线的距离
      axisTick: { //坐标刻度线样式
        lineStyle: {
          color: "rgba(255,255,255,0.5)"
        }
      },
      axisLabel: { //坐标轴刻度标签名样式
        color: "#e2e9ff",
        fontSize: 12*KO,
        rotate: 0, //文字倾斜(当刻度标签名过长时使用)
        interval: 0 //显示全部                
      },
      axisLine: { //坐标轴线设置
        show: true,
        lineStyle: {
          color: "rgba(255,255,255,0.5)",
          width: "1"
        },
        // symbol: ["none", "arrow"], //坐标轴末端箭头
        // symbolSize: [8, 10], //箭头高度和宽度
        // symbolOffset: [0, 0] //箭头与轴线端点的距离
      },
      splitNumber: 7,
    },
    yAxis: {
      name: "数量",
      splitNumber: 8,
      nameTextStyle: { //坐标轴名称样式
        color: "#e2e9ff",
        fontSize: 12*KO,
        backgroundColor: "" //文字块背景色
      },
      nameGap: 10*KO,    //坐标名称与轴线的距离
      axisLine: { //坐标轴线设置
        show: true,
        lineStyle: {
          color: "rgba(255,255,255,0.5)",
          width: "1"
        },
        // symbol: ["none", "arrow"], //坐标轴末端箭头
        // symbolSize: [8, 20], //箭头高度和宽度
        // symbolOffset: [0, 16] //箭头与轴线端点的距离
      },
      axisTick: { //坐标刻度线样式
        lineStyle: {
          color: "rgba(255,255,255,0.5)"
        }
      },
      axisLabel: { //坐标轴刻度标签名样式
        color: "#e2e9ff",
        fontSize: 12*KO,
      },
      splitLine: { //垂直分割线
        show: true,
        lineStyle: {
          color: "rgba(255,255,255,0.1)",
          width: "1"
        }
      },
    },
    series: [
      {
        name: '处理完成',
        type: 'bar',
        color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [{offset: 0,color: '#3E3CB5'}, {offset: 1,color: '#D66BFD'}]),
        // data: [200, 330, 440, 550, 660, 770, 880]
        data: data.zhu1
      }, {
        name: '正在处理',
        type: 'bar',
        color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [{offset: 0,color: '#0D52A1'}, {offset: 1,color: '#09F6FD'}]),
        // data: [880, 770, 660, 550, 440, 330, 220]
        data: data.zhu2
      }, {
        name: '正在等待',
        type: 'bar',
        color: new echarts.graphic.LinearGradient(0, 0, 1, 0,[{offset: 0,color: '#025B71'}, {offset: 1,color: '#3BFE91'}]),
        //barGap:0,                                           //条形组中各条形图之间的距离
        barCategoryGap: 15*KO,                                    //条形组之间的距离
        // data: [550, 420, 360, 750, 460, 660, 290],
        data: data.zhu3
        //barWidth:30,
        // barMaxWidth:30
      }
    ]
  };
  // 基于准备好的dom，初始化echarts实例
  echarts.init(el).setOption(option); 
}


/*----------------------------------------------*/


//1.基础图形渲染函数封装：竖向柱形图
function home_basezhu(el,d){
  var color = d.zhuColor;
  var data = d.data;
  var zhuWidth = d.zhuWidth;
  var grid = d.grid;
  var textColor = d.textColor;
  var size = d.size || 14*KO;
  var option = {
    // backgroundColor: '#00265f',
    tooltip: {
      trigger: 'axis',
      axisPointer: {
        type: 'shadow',
        // label:{
        //   show:true,
        //   backgroundColor: '#FFED27',
        //   fontSize:this.f2,
        //   color:'#001A53'                  
        // }
      },
      textStyle:{
        fontSize: size
      },
      formatter:'{b} <span style="color:#FFED27;">{c}</span>',
      padding:[5*KO,10*KO]
    },
    grid: grid || {
      top: '15%',
      right: '10%',
      left: '12%',
      bottom: '30%'
    },
    xAxis: [{
      type: 'category',
      data: data.name,
      axisLine: {
        lineStyle: {
          color: 'rgba(255,255,255,0.12)'
        }
      },
      axisLabel: {
        interval:0,      //强制显示所有刻度标签
        rotate:-45,       //标签旋转30度
        margin: 10*KO,
        color: textColor || '#e2e9ff',
        textStyle: {
          fontSize: size
        },
      },
    }],
    yAxis: [{
      axisLabel: {
        formatter: '{value}',
        color: textColor || '#e2e9ff',
        textStyle: {
          fontSize: size
        },
      },
      axisLine: {
        show: false
      },
      splitLine: {
        lineStyle: {
          color: 'rgba(255,255,255,0.12)'
        }
      }
    }],
    series: [{
      type: 'bar',
      data: data.value,
      barWidth: zhuWidth || 30*KO,
      itemStyle: {
        normal: {
          color: new echarts.graphic.LinearGradient(0, 0, 0.5, 1, [{
              offset: 0,
              color: color[0] // 0% 处的颜色
          }, {
              offset: 1,
              color: color[1]  // 100% 处的颜色
          }], false),
          barBorderRadius: [30*KO, 30*KO, 30*KO, 30*KO],
          shadowColor: 'rgba(0,160,221,1)',
          shadowBlur: 4*KO,
        }
      },
      label: {
        normal: {
          show: true,
          // lineHeight: 20*KO,
          // width: 80,
          // height: 30*KO,
          backgroundColor: 'rgba(0,160,221,0)',
          borderRadius: 200,
          position: 'top',
          distance: 1,
          formatter: '{a|{c}}',
          rich: {
            a: {
              color: '#fff',
              align: 'center',
              fontSize:14*KO
            },
          }
        }
      }
    }]
  };
  echarts.init(el).setOption(option);
}


//2.基础图形渲染函数封装：横向柱形图
function home_basezhu2(el,d){
  //图形数据
  var data = d.data || {       
    name:["项目1","项目2","项目3","项目4","项目5"],
    value:[55, 35, 30,22,20]
  };
  //图形整体位置，大小控制
  var grid = d.grid || {
    top:'10%',
    bottom:'15%',
    right:'15%',
    left: 85*KO
  }; 
  //主子颜色控制--渐变色 [] 
  var color = d.zhuColor;
  var barColor = new echarts.graphic.LinearGradient(0, 0, 0.5, 1, [{
              offset: 0,
              color: color[0] // 0% 处的颜色
          }, {
              offset: 1,
              color: color[1]  // 100% 处的颜色
  }], false)
  //柱子宽度控制
  var barWidth = d.barWidth || 20*KO;

  //图形中的文字大小控制
  var size = d.size || 12*KO;
  

  var option = {
    // tooltip: {
    //     trigger: 'axis',
    //     axisPointer: {
    //         type: 'shadow'
    //     }
    // },
    grid: grid,
    xAxis: {
      type: 'value',
      axisLabel: {
        interval:0,      //强制显示所有刻度标签
        // rotate:-30,       //标签旋转30度
        margin: 10*KO,
        color: '#BFC6E0',
        textStyle: {
            fontSize: 12*KO
        }
      },
      axisLine: {               //设置轴线
        lineStyle:{
            type:'dashed',      //设置网格线类型 dotted：虚线   solid:实线
            color: ['#315070'],
            width: 1
        },
      },
      splitLine: {         //设置网格线样式
        show:true,         //隐藏或显示
        lineStyle:{
          type:'dashed',  //设置网格线类型 dotted：虚线   solid:实线
          color: ['#315070'],
          width: 1
        }
  　　}
    },
    yAxis: {
        type: 'category',
        inverse: true,
        data: data.name,
        axisLabel: {
          // interval:0,       //强制显示所有刻度标签
          margin: 10*KO,
          color: '#BFC6E0',
          textStyle: {
              fontSize: size
          }
        },
        axisLine: {               //设置轴线
          lineStyle:{
            type:'dashed',      //设置网格线类型 dotted：虚线   solid:实线
            color: ['#315070'],
            width: 1
          }
        },
        splitLine: {         //设置网格线样式
          show:false,         //隐藏或显示
    　　}
    },
    series: [{
      type: 'bar',
      barWidth: barWidth,
      data: data.value,
      label: {
        normal: {
          show: true,
          // show: true,
          // textBorderColor: '#333',
          // textBorderWidth: 2
          // lineHeight: 20*KO,
          // width: 80,
          // height: 30*KO,
          // backgroundColor: 'red',
          // position: ['102%', KO*8],
          position: 'right',
          distance: 1,
          formatter: '{a|{c}}',
          rich: {
            a: {
              color: '#fff',
              align: 'center',
              fontWeight:'bold',
              fontSize: size
            }
          }
        }
      },
      itemStyle: {
        normal: {
          color: barColor,
          barBorderRadius: [30*KO, 30*KO, 30*KO, 30*KO],
          shadowColor: 'rgba(0,160,221,1)',
          shadowBlur: 4*KO,
        }
      },
    }]
  };
  echarts.init(el).setOption(option);
}


//3.基础图形渲染函数封装：折线带有渐变区域
function home_baseline(el,d){
  var data = d.data || {
    name:['1月', '2月', '3月', '4月', '5月', '6月', '7月','8月','9月','10月','11月','12月'],
    value:[96, 92, 94, 99, 90, 97,98,96,90,97,93,97]
  };

  var option = {
    tooltip: {
        trigger: 'axis',
        axisPointer: {
          type: 'cross',
          label:{
            show:true,
            backgroundColor: '#FFED27',
            fontSize: 16*KO,
            color:'#001A53'                  
          }
        },
        textStyle:{
          fontSize: 16*KO
        },
        formatter:'{b}：<span style="color:#FFED27;">{c}</span>',
        padding:[5*KO,10*KO]
    },
    grid: {
      // top: 'middle',
      // left: '0%',
      // right: '10%',
      // bottom: '3%',
      // height: '80%',
      // containLabel: true
      top: '18%',
      right: '10%',
      left: '12%',
      bottom: '20%'
    },
    calculable : true,
    xAxis: [{
      type: 'category',
      data: data.name,
      axisLine: {
          lineStyle: {
              color: 'rgba(255,255,255,0.12)'
          }
      },
      axisLabel: {
          interval:0,      //强制显示所有刻度标签
          margin:10*KO,       //刻度标签与轴线之间的距离。
          color: '#71869F',
          textStyle: {
              fontSize:  16*KO
          },
      },
    }],
    yAxis: [{
      name:'单位：笔',
      nameTextStyle: { //坐标轴名称样式
        color: "#A6CDFD",
        fontSize: 15*KO,
        fontWeight:'bold',
        backgroundColor: "" //文字块背景色
      },
      nameGap: 30*KO, //坐标名称与轴线的距离
      axisLabel: {
        margin:20*KO,       //刻度标签与轴线之间的距离。
        // formatter: '{value}',
        color: '#71869F',
        textStyle: {
            fontSize:  16*KO
        },
      },
      axisLine: {
          show: false
      },
      splitLine: {
        lineStyle: {
          color: 'rgba(255,255,255,0.12)'
        }
      }
    }],
    series : [
      {
        type:'line',
        // min:10,
        // max:40,
        data:data.value,

        lineStyle: {
          normal: {
            width: 2*KO,
            color: {
              type: 'linear',
              colorStops: [{
                  offset: 0,
                  color: '#AAF487' // 0% 处的颜色
                },
                {
                  offset: 0.4,
                  color: '#47D8BE' // 40% 处的颜色
                }, {
                  offset: 1,
                  color: '#47D8BE' // 100% 处的颜色
                }
              ],
              globalCoord: false // 缺省为 false
            },
            shadowColor: 'rgba(71,216,190, 0.5)',
            shadowBlur: 10,
            shadowOffsetY: 7
          }
        },
        itemStyle: {
          normal: {
            color: 'yellow',
            borderWidth: 5*KO,
            borderColor: "#65FFFF"
          }
        },
        smooth: true,
        label:{
          show:true,
          color:'#65FFFF',
          fontSize: 16*KO
        },
        areaStyle: {
          color: {
            type: 'linear',
            x: 0,
            y: 0,
            x2: 0,
            y2: 1,
            colorStops: [{
                offset: 0, color: 'rgba(111, 255, 255, 1)' // 0% 处的颜色
            }, {
                offset: 0.9, color: 'rgba(111, 255, 255, 0)' // 100% 处的颜色
            }],
            global: false                   // 缺省为 false
          }             
        }, 
      }
    ]
  };
  echarts.init(el).setOption(option);
}

//4.基础图形渲染函数封装：小矩形堆叠柱状图
function home_baserect_zhu(el,d){
  var color = d.zhuColor;
  var data = d.data;
  var zhuWidth = d.zhuWidth;
  var grid = d.grid;
  var textColor = d.textColor;
  var size = d.size || 14*KO;
  var option = {
    // backgroundColor: '#00265f',
    tooltip: {
      trigger: 'axis',
      axisPointer: {
        type: 'shadow',
        // label:{
        //   show:true,
        //   backgroundColor: '#FFED27',
        //   fontSize:this.f2,
        //   color:'#001A53'                  
        // }
      },
      textStyle:{
        fontSize: size
      },
      formatter:'{b} <span style="color:#FFED27;">{c}</span>',
      padding:[5*KO,10*KO]
    },
    grid: grid || {
      top: '15%',
      right: '10%',
      left: '12%',
      bottom: '30%'
    },
    xAxis: [{
      type: 'category',
      data: data.name,
      axisLine: {
        lineStyle: {
          color: 'rgba(255,255,255,0.12)'
        }
      },
      axisLabel: {
        interval:0,      //强制显示所有刻度标签
        rotate:-45,       //标签旋转30度
        margin: 10*KO,
        color: textColor || '#e2e9ff',
        textStyle: {
          fontSize: size
        },
      },
    }],
    yAxis: [{
      axisLabel: {
        formatter: '{value}',
        color: textColor || '#e2e9ff',
        textStyle: {
          fontSize: size
        },
      },
      axisLine: {
        show: false
      },
      splitLine: {
        lineStyle: {
          color: 'rgba(255,255,255,0.12)'
        }
      }
    }],
    series: [{
      type: 'pictorialBar',
      animation: true,
      animationDuration: 600,
      symbol: 'rect',
      symbolRepeat: true,
      symbolSize: [25*KO, 4*KO],
      symbolMargin: 1,
      barWidth: zhuWidth || 30*KO,
      itemStyle: {
        normal: {
          color:"#39F5FF",
          // color: function(params) {
          //     return colorList[params.dataIndex]
          // },
          barBorderRadius: [30*KO, 30*KO, 30*KO, 30*KO],
          shadowColor: 'rgba(0,160,221,1)',
          shadowBlur: 4*KO,
        }
      },
      data: data.value,
      label: {
        normal: {
          show: true,
          // lineHeight: 20*KO,
          // width: 80,
          // height: 30*KO,
          backgroundColor: 'rgba(0,160,221,0)',
          borderRadius: 200,
          position: 'top',
          distance: 1,
          formatter: '{a|{c}}',
          rich: {
            a: {
              color: '#39F5FF',
              align: 'center',
              fontSize:14*KO
            },
          }
        }
      }
    }]
  };
  echarts.init(el).setOption(option);
}






